package com.Object;

public class ObjectDemo1 {
    public static void main(String[] args) {
        Student s1 = new Student();
        Student s2 = new Student();
        s1.setName("张三");
        s1.setAge(20);
        s2.setName("李四");
        s2.setAge(24);

        //这两种方法比较的都是s1,s2的地址，而非内容
        /*System.out.println(s1==s2);
        System.out.println(s1.equals(s2));*/
        System.out.println(s1.equals(s2));

    }
}
